package com.nuaa.ange.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.nuaa.ange.annotation.ApiLog;
import com.nuaa.ange.common.lang.RespBean;
import com.nuaa.ange.entity.Star;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @description
 * @author 玦离
 * @date 2023/1/4 14:43
 */

@RestController
@RequestMapping("/star")
public class StarController extends BaseController{

    @ApiOperation(value = "点赞文章")
    @PostMapping("/save")
    @ApiLog
    public RespBean saveStar(@RequestBody Star star) {
        star.setUserId(getProfileId());
        starService.save(star);
        return RespBean.ok("一条收藏记录已保存");
    }
}
